When creating a hole through a workpiece by electric discharge machining, a feed amount of an electrode needs to be set in anticipation of a wear amount of the electrode because the electrode is worn away during the machining.
Because the wear of the electrode is not always constant, in order to avoid a situation in which the machining ends before the hole penetrates through the workpiece, the consumption amount of the electrode needs to be estimated larger. However, if an amount of projecting the electrode after penetrating through the workpiece is too large, an edge of the hole becomes sagged, and therefore, it is not desirable to set the projecting amount of the electrode more than necessary.
Furthermore, in the case of machining in which a hole is created on only an upper side plate of two plates arranged in an overlapped manner with a space therebetween, if the electrode after penetrating through the upper side plate is projected more than necessary, the electrode may hit a lower side plate.
In order to prevent such event from occurring, a position at which the electrode has penetrated through the workpiece needs to be accurately detected.
In Patent Literature 1, a technique has been disclosed in which the maximum voltage is compared with a predetermined voltage value in a state where an update of a lowering position of an electrode is detected during machining, and when an event in which the maximum voltage is increased to be equal to or higher than the predetermined voltage value occurs continuously for a predetermined number of times or more, it is determined that a hole created by electric discharge has penetrated through a workpiece.